import ContextTO from "./context_js"
import {useContext} from "react"
const Context_two=()=>{
    const context = useContext(ContextTO)
    return(
        <div>
            <h1>拿到全局共享的todo数据</h1>
            <button
                onClick={
                    ()=>context.updateList(
                        {title:"hahah",level:2}
                    )
                }
            >
                添加一条todo（信息）
            </button>
        </div>
    )
}
export default Context_two